/*
泛型类
*/
/*
 1. 声明泛型类型: 在类名的右侧  <T>   // T K V
 2. 使用泛型: 类体中
 3. 指定泛型的具体类型: 创建类的实例时, 类名的右侧 <具体类型>
 */
(function () {
    var GenericData = /** @class */ (function () {
        function GenericData() {
        }
        return GenericData;
    }());
    var genericNumber = new GenericData();
    genericNumber.zeroValue = 4;
    genericNumber.add = function (x, y) {
        return x + y;
    };
    console.log(genericNumber.add(genericNumber.zeroValue, 5));
    var genericString = new GenericData();
    genericString.zeroValue = 'abc';
    genericString.add = function (x, y) {
        return x + y;
    };
    console.log(genericString.add(genericString.zeroValue, '23'));
})();
